# locust777


//函数练习19

//及规划，本周将C语言课程174节学习完，目前已学习123

//加法
int Add(int x,int y)
{
return x + y;
}

//比较
int Max(int x,int y)
{
return (x>y)?x:y;
}

//交换
void change(int* x,int* y)
{
int tmp = *x;
*x = *y;
*y = tmp;
}


#include<stdio.h>
#include<windows.h>
int main()
{
	int a = 0;int b = 0;
	scanf("%d%d",&a,&b);
	printf("输入前：a = %d,b = %d",a,b);
	printf("相加为：%d\n",Add(a,b));
	printf("比较大的是：%d\n",Max(a,b));
	change(&a,&b);
	printf("交换后：a = %d,b = %d\n",a,b);
system("pause");
return 0;
}